\chapter{Requirements from the set B}

\section{Message passing}

\subsection*{Messages}
\textbf{Status:} done

The messages in PORN-OS are like described in the requirements. There is three types of messages, the first one carries integer, the second one character string and the last one some information about the sender. All messages have a sender, a receiver and a priority field.

\subsection*{Message queues}
\textbf{Status:} done

Each process has exactly one message queue, which is dynamic in size.

\subsection*{Sending messages}
\textbf{Status:} done

A process can send a message to another process using one of the envoyer system calls. In our system, those calls returns an error if there is not enough memory for a new message. They are not blocking.

\subsection*{Receiving messages}
\textbf{Status:} done

Processes can receive messages and filter them by sender or priority. There are two types of receive calls, those that end with ``delai'' block the caller only for a specified amount of time. The others block it until a correct message arrives. 

\subsection*{Ring}
\textbf{Status:} done

The ring is done by a process that spawns a given number of processes. One of them (the last one created) starts the ring by sending a message to its neighbor which does the same with its own neighbor. And so on until a given number of messages have gone through the ring.

\subsection*{Dining philosophers}
\textbf{Status:} done

The dining philosophers problem is here solved using message passing. To achieve synchronization using that paradigm, we used the waiter solution. So, each time a philosopher wants to pick a fork up, she has to ask the waiter if it is okay to grap it. The waiter knows the status of all the forks and can then make a choice that avoids deadlocks.
